package com.xinsoft.service.impl;

import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xinsoft.common.Response;
import com.xinsoft.common.exception.BDException;
import com.xinsoft.entity.dto.MesBomImportDTO;
import com.xinsoft.entity.dto.MesWorkTeamParam;
import com.xinsoft.entity.po.MesWorkTeam;
import com.xinsoft.entity.vo.MesWorkTeamVo;
import com.xinsoft.service.MesWorkTeamService;
import com.xinsoft.mapper.MesWorkTeamMapper;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

/**
* @author 13370
* @description 针对表【mes_work_team(班组)】的数据库操作Service实现
* @createDate 2023-08-22 11:12:16
*/
@Service
public class MesWorkTeamServiceImpl extends ServiceImpl<MesWorkTeamMapper, MesWorkTeam>
    implements MesWorkTeamService{

    @Override
    public Response<?> importExcel(MultipartFile multipartFile, HttpServletResponse response) {

        ImportParams params = new ImportParams();
        params.setTitleRows(1);
        params.setHeadRows(1);
        // 解析excel中的行，mesBomImportList
        try {
            // 解析excel
//            mesBomImportList = ExcelImportUtil.importExcel(multipartFile.getInputStream(), MesWorkTeam.class, params);
        } catch (Exception e) {
            throw new BDException("导入失败，文件内容解析错误！");
        }
        return null;
    }

    @Override
    public Response<?> findPageListByParam(MesWorkTeamParam param) {
        return null;
    }

    @Override
    public MesWorkTeamVo detail(Integer id) {
        return null;
    }
}




